<?php $this->pageTitle = $model->name; ?>
<?php
/* @var $this GroupsController */
/* @var $model Groups */
/* @var $form CActiveForm */
?>
	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'groups-form',
		'enableAjaxValidation'=>false,
		'htmlOptions'=>array('rel' =>Yii::app()->createUrl('groups/index')),
	)); ?>
	
		<?php echo $form->errorSummary($model); ?>
	
		
		<table class="flds_form">
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'name'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'name',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'name'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'description'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textArea($model,'description',array('class'=>'settings_fld','rows'=>6, 'cols'=>50)); ?>
						</div>
						<?php echo $form->error($model,'description'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'website'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'website',array('class'=>'settings_fld','size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'website'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'category'); ?>
				</td>
				<td class="flds_form_r">
					<div class="select_block long">
						<?php echo $form->dropDownList($model,'category',array(
								'Развлечение'=>'Развлечение',
								'Общие интересы'=>'Общие интересы',
								'Спорт и отдых'=>'Спорт и отдых',
								'Исскуство и развлечение'=>'Исскуство и развлечение',
								'Аудио и видео'=>'Аудио и видео',
								'Любовь и дружба'=>'Любовь и дружба',
								'Компьютер и интернет'=>'Компьютер и интернет',
								'Объединения'=>'Объединения',
								'Транспорт'=>'Транспорт',
								'Покупки'=>'Покупки',
								'География'=>'География',
								'Религия'=>'Религия',							
								'Разное'=>'Разное',							
							),  array('empty' => ('Выберите категорию'))); ?>
						<?php echo $form->error($model,'category'); ?>
					</div>
				</td>				
			</tr>			
			<!-- 
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'country_id'); ?>
				</td>
				<td class="flds_form_r">
					<div class="select_block long">						
						<?php echo $form->dropDownList($model,'country_id',CSelect::items('Country'),  array('empty' => ('Выберите страну'))); ?>						
						<?php echo $form->error($model,'country_id'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'city'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'city',array('class'=>'settings_fld','size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'city'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'status'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'status',array('class'=>'settings_fld','size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'status'); ?>
					</div>
				</td>
			</tr>
 			-->
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'approve'); ?>
				</td>
				<td class="flds_form_r">
					<div class="select_block long">
						<?php echo $form->dropDownList($model,'approve',CSelect::items('GroupType'),  array('empty' => ('Выберите тип'))); ?>
						<?php echo $form->error($model,'approve'); ?>
					</div>
				</td>
			</tr>
		</table>
		<?php echo $form->hiddenField($model,'avatar'); ?>
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Добавить сообщество' : 'Сохранить изменения', array('class'=>'green_btn tac')); ?>
	<?php $this->endWidget(); ?>